package tdd.domain;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class Employee {
    private String firstName;
    private String lastName;
    private String birthday;
    private String email;
    private DateTimeFormatter defaultFormatter =  DateTimeFormatter.ofPattern("yyyy/MM/dd");

    public Employee(String firstName, String lastName, String birthday, String email) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.birthday = birthday;
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public String getBirthday() {
        return birthday;
    }

    public LocalDate getBirthdayWithDefaultFormatter() {
        return LocalDate.parse(birthday, defaultFormatter);
    }
}
